/**   
 * 项目名：化工企业安全生产信息化管理平台
 * 日期：    2020-03-01 22:19:08  
 * Copyright (c) 2015- -版权所有     
 */

package com.joysuch.wwyt.edu.service;

import java.util.List;

import com.joysuch.wwyt.core.exception.BusinessRestrictionsException;
import com.joysuch.wwyt.edu.bean.EduQuestionDetailBean;
import com.joysuch.wwyt.edu.bean.EduQuestionEditBean;
import com.joysuch.wwyt.edu.bean.EduQuestionListBean;
import com.joysuch.wwyt.edu.bean.EduQuestionListBean.SearchEduQuestion;
import com.joysuch.wwyt.edu.bean.EduRandomSelectQuestionBean;
import com.joysuch.wwyt.edu.bean.EduRandomSelectQuestionConfig;
import com.joysuch.wwyt.edu.entity.EduQuestion;
import com.joysuch.wwyt.edu.service.impl.EduQuestionServiceImpl.QuestionSelectWrapper;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

public interface EduQuestionService {

    public EduQuestion add(EduQuestionEditBean entity);

    void update(EduQuestionEditBean entity);

    Page<EduQuestionListBean> findByPage(Pageable page, SearchEduQuestion condition);

    void delete(Long id) throws BusinessRestrictionsException;

    EduQuestionDetailBean getById(Long id);

    EduQuestion findById(Long id);

    /**
     * 随机选择指定类型的题目
     * 
     * @param configs
     * @return
     */
    List<EduQuestion> randomSelect(List<EduRandomSelectQuestionConfig> configs);

    List<QuestionSelectWrapper> randomSelectWrapper(List<EduRandomSelectQuestionConfig> configs);

    List<EduRandomSelectQuestionBean> randomSelectAndConvert(List<EduRandomSelectQuestionConfig> configs);

}
